﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
if qingtian.bbs<>true then
	Response.Redirect "/index.asp?sid="&sidd
	Response.end
end if
IF  Request.QueryString("Action")="savea" Then
	call savea
else
	call index
end if
end Function
Function index
	dim rs,sql,Runtxt,str
	Runtxt=qingtian.RunStr
	dim id,url,urls,pid
    		pid = Request("pid")    
    		If pid = "" Then pid = 1
   		If Not IsNumeric(pid) Then pid = 1
    		pid = CLng(pid)
    		If pid < 0 Then pid = 1
    		id = Request("id")    
    		If id = "" Then id = 1
   		If Not IsNumeric(id) Then id = 1
    		id = CLng(id)
                url=Request.QueryString("url") 
                urls=replace(url,"@@","&amp;")
select case v
case "0"
we0="<br/>"
hr="-------------<br/>"
%>
<card title="删除栏目"><p align="<%=qingtian.px%>">
<%
case "1"
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
%>
<title删除栏目</title><%=we%>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%

End Select
	set rs=server.CreateObject("adodb.recordset")
	sql="select top 1 * from qingtian_showclass where id="&id&" "
	rs.open sql,conn,1,1
	if not (rs.bof and rs.eof) then
%>		
	确认删除栏目:<%=qingtian.utf8(rs("name"))%>吗?<br/>
    	<a href="delbannji.asp?Action=savea&amp;url=<%=url%>&amp;id=<%=id%>&amp;pid=<%=pid%>&amp;sid=<%=sidd%>">确定删除</a><br/>
<%else%>
暂无栏目！<br/>
<%
end if
rs.Close
Set rs = Nothing
%>
<a href='bannji.asp?url=<%=url%>&amp;id=<%=pid%>&amp;sid=<%=sidd%>'>返回栏目管理</a><%=we0%>
<%=sou%><a href='<%=urls%>'>返回来源页</a><%=we0%>

<%
end Function 


Function savea
		dim id,pid,url,urls,rs,sql
    		pid = Request("pid")    
    		If pid = "" Then pid = 1
   		If Not IsNumeric(pid) Then pid = 1
    		pid = CLng(pid)
    		If pid < 0 Then pid = 1
    		id = Request("id")    
    		If id = "" Then id = 1
   		If Not IsNumeric(id) Then id = 1
    		id = CLng(id)
                url=Request.QueryString("url") 
                urls=replace(url,"@@","&amp;")
		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select  * FROM qingtian_showclass where id="&id&""
		rs.open sql,conn,1,3
		if not (rs.bof and rs.eof) then
		rs.delete
		end if
		rs.Close
		Set rs = Nothing
select case v
case "0"
we0="<br/>"
hr="-------------<br/>"
%>
<card title="修改栏目"><p align="<%=qingtian.px%>">
<%
case "1"
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
%>
<title>修改栏目</title><%=we%>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%

End Select	
%>
删除栏目成功!<br/>
<a href='bannji.asp?url=<%=url%>&amp;id=<%=pid%>&amp;sid=<%=sidd%>'>返回栏目管理</a><br/>
<a href='<%=urls%>'>返回来源页</a><%=we0%>

   <%
end Function
%>
